<template>
  <section>
    <div class="model myfile">
      <img :src="IMGBASE64.WODEWENJIAN2X" class="pink">
      <span class="title">部门管理</span>
      <div class="kong"></div>
      <div class="t_title">
        <img>
        <span class="f-blue">{{schoolName}}</span>
      </div>
      <div class="tree">
          <el-tree
          class="haha"
          ref="tree"
          :data="data"
          :props="defaultProps"
          accordion
          node-key="id">
        </el-tree>
      </div>
    </div>
    


    <div class="dright">
      <div class="t_title">
        <img>
        <span class="f-blue">学校组织架构</span>
        <div class="right">
          <el-button type="primary" size="mini" @click="buttonShow" v-show="bianji">编辑</el-button>
          <el-button type="danger" size="mini" @click="clearbutton" v-show="baocun">保存</el-button>
          <el-button type="success" size="mini" @click="newAddShow">新增</el-button>
        </div>
      </div>

      <!-- <div class="tree">
        <el-tree
        :default-checked-keys="sList"
        :expand-on-click-node="true"
        @check-change="checkChange"
        :filter-node-method="filterNode"
        show-checkbox
        ref="tree2"
        :data="data2"
        :props="defaultProps"
        accordion
        node-key="id"
        :default-expanded-keys="[100]">
      </el-tree> -->
      <div class="tree">
        <template v-for="item in data2">
          <ul class="fatherUl">
            <li class="fatherLi">
              <i :class="{'el-icon-caret-right' : item.rightArrow, 'el-icon-caret-bottom' : item.bottomArrow}" @click="changeTree(item)"></i>
              {{item.label}}
              <div class="right" v-show="buttonshow">
                <i class="fa fa-pencil" aria-hidden="true" @click="DEPxiugaishow(item)"></i>
                <!-- <el-button type="primary" size="mini" @click="DEPxiugaishow(item)">修改</el-button> -->
                <i class="fa fa-plus" style="color: #67C23A;" aria-hidden="true" @click="newAddPeople(item)"></i>
                <!-- <el-button type="success" size="mini" @click="newAddPeople(item)">新增</el-button> -->
                <i class="fa fa-times" style="color: #FA5555;" aria-hidden="true" @click="DEPtipShow(item)"></i>
                <!-- <el-button type="danger" size="mini" @click="DEPtipShow(item)">删除</el-button> -->
              </div>
            </li>
            <ul class="childrenUl" v-for="items in item.children" v-show="item.tree">
              <li class="childrenLi">
                {{items.label}}
                <div class="right" v-show="buttonshow">
                  <i class="fa fa-pencil" aria-hidden="true" @click="xiugaishow(item, items)"></i>
                  <!-- <el-button type="primary" size="mini" @click="xiugaishow(item, items)">修改</el-button> -->
                  <i class="fa fa-times" style="color: #FA5555;" aria-hidden="true" @click="PEOtipShow(items)"></i>
                  <!-- <el-button type="danger" size="mini" @click="PEOtipShow(items)">删除</el-button> -->
                </div>
              </li>
            </ul>
          </ul>
        </template>
      </div>
      <!-- <el-button class="t-btn" type="danger">确认提交</el-button> -->
      </el-tree>
      <!-- <button class="btn btn-danger">确认提交</button> -->
    </div>

    <!-- 新建部门 -->
    <div class="up" v-show="upShow">
      <img :src="IMGBASE64.GREENXINZENG2X" class="img">
      <span class="title">新建</span>
      <el-button icon="el-icon-close" class="close" @click="newAddShow()"></el-button>
      <header>
        <span class="header-title">基本信息</span>
      </header>
      <div class="kong"></div>
      <el-form label-width="100px">
        <el-form-item label="部门名称">
          <input type="text" class="form-longText" v-model="departmentName">
        </el-form-item>
      </el-form>
      <div class="kong1"></div>
      <div class="bottom">
        <div class="right">
          <el-button type="success" @click="addDepartment" size="small">确定</el-button>
        </div>
      </div>
    </div>

    <!-- 新建职位 -->
    <div class="up" v-show="addPeople">
      <img :src="IMGBASE64.GREENXINZENG2X" class="img">
      <span class="title">新建</span>
      <el-button icon="el-icon-close" class="close" @click="closeAddPeople()"></el-button>
      <header>
        <span class="header-title">基本信息</span>
      </header>
      <el-form label-width="100px">
        <el-form-item label="创建角色">
          <input type="text" class="form-text" v-model="addPeopleForm.position">
          <!-- <div class="content">
            <ul>
              <li v-for="item in roleArray">
                <span>{{item.name}}</span>
                <input type="text" class="form-text" v-model="addPeopleForm.position">
              </li>
            </ul>
            <div class="clear"></div>
          </div> -->
        </el-form-item>
        <el-form-item label="角色code值">
          <input type="text" class="form-text" v-model="addPeopleForm.positionCode">
          <!-- <el-button @click="addRole"><i class="el-icon-plus"></i></el-button>
          <el-button @click="reduceRole"><i class="el-icon-minus"></i></el-button> -->
        </el-form-item>
      </el-form>
      <div class="bottom">
        <div class="right">
          <el-button type="success" @click="addPeopleData" size="small">确定</el-button>
        </div>
      </div>
    </div>

    <!-- 修改部门信息 -->
    <div class="up" v-show="DEPxiugaiShow">
      <img :src="IMGBASE64.XIANGQING2X" class="img">
      <span class="title">修改</span>
      <el-button icon="el-icon-close" class="close" @click="closeDEPxiugaishow()"></el-button>
      <header>
        <span class="header-title">基本信息</span>
      </header>
      <el-form label-width="100px">
        <el-form-item label="部门名称">
          <input type="text" class="form-longText" v-model="xiugaidepartmentName">
        </el-form-item>
      </el-form>
      <div class="bottom">
        <div class="right">
          <el-button type="success" @click="changeDepartment" size="small">确定</el-button>
        </div>
      </div>
    </div>

    <!-- 修改职位信息 -->
    <div class="up" v-show="xiugaiShow">
      <img :src="IMGBASE64.XIANGQING2X" class="img">
      <span class="title">修改</span>
      <el-button icon="el-icon-close" class="close" @click="closexiugaishow()"></el-button>
      <header>
        <span class="header-title">基本信息</span>
      </header>
      <el-form label-width="100px">
        <el-form-item label="部门名称">
          <input type="text" class="form-longText" v-model="xiugaidepartmentName" :disabled='true'>
        </el-form-item>
        <el-form-item label="职位名称">
          <input type="text" class="form-longText" v-model="positionForm.position">
        </el-form-item>
        <!-- <div class="thirdLine">
          <span>职位code值:</span>
          <input type="text" class="form-longText" v-model="positionForm.positionCode">
        </div> -->
      </el-form>
      <div class="bottom">
        <div class="right">
          <el-button type="success" @click="changePosition" size="small">确定</el-button>
        </div>
      </div>
    </div>

    <!-- 删除部门提示 -->
    <div class="smallUp" v-show="DEPtip">
      <div class="word">
        <span class="tipWord">是否删除部门信息？</span>
      </div>
      <div class="button">
        <el-button type="danger" @click="deleteData" size="small">确定</el-button>
        <el-button @click="closeDtip" size="small">取消</el-button>
      </div>
    </div>
    
    <!-- 删除职位提示 -->
    <div class="smallUp" v-show="PEOtip">
      <div class="word">
        <span class="tipWord">是否删除职位信息？</span>
      </div>
      <div class="button">
        <el-button type="danger" @click="deleteZWData" size="small">确定</el-button>
        <el-button @click="closePtip" size="small">取消</el-button>
      </div>
    </div>

    <transition name="modal-shadow">
      <div class="modal-backdrop" v-show="anShow"></div>
    </transition>
  </section>
</template>

<script>
// let code = 1000
export default {
  data () {
    return {
      DEPtip: false,
      PEOtip: false,
      departId: null,
      positionId: null,
      id: null,
      sList: [],
      bianji: true,
      baocun: false,
      schoolId: null,
      schoolList: [],
      schoolName: '学校组织架构',
      expand: [100],
      subjectSelect: null,
      subjectOption: [],
      upShow: false,
      xiugaiShow: false,
      addPeople: false,
      anShow: false,
      buttonshow: false,
      DEPxiugaiShow: false,
      departmentName: null,
      xiugaidepartmentName: null,
      addPeopleForm: {
        departId: null,
        position: null,
        positionCode: null
      },
      positionForm: {
        id: null,
        departId: null,
        position: null,
        positionCode: null
      },
      data: [{
        code: '110',
        label: '校长室',
        children: [{
          code: '111',
          label: '校长'
        }, {
          code: '112',
          label: '副校长'
        }]
      }, {
        code: '120',
        label: '招生办',
        children: [{
          code: '121',
          label: '路人已'
        }]
      }, {
        code: '120',
        label: '招生办',
        children: [{
          code: '121',
          label: '路人已'
        }]
      }, {
        code: '120',
        label: '招生办',
        children: [{
          code: '121',
          label: '路人已'
        }]
      }],
      data2: [{
        code: '110',
        label: '校长室',
        tree: false,
        children: [{
          code: '111',
          label: '校长'
        }, {
          code: '112',
          label: '副校长'
        }]
      }, {
        code: '120',
        label: '招生办',
        tree: false,
        children: [{
          code: '121',
          label: '路人已'
        }]
      }, {
        code: '120',
        label: '招生办',
        tree: false,
        children: [{
          code: '121',
          label: '路人已'
        }]
      }, {
        code: '120',
        label: '暂无数据，请先完善相关信息!',
        tree: false,
        children: [{
          code: '121',
          label: '路人已'
        }]
      }],
      defaultProps: {
        children: 'children',
        label: 'label'
      },
      roleArray: []
    }
  },
  mounted () {
    this.schoolName = '组织架构'
    // let _cookie = document.cookie.split(';')
    // let _cookieArray = []
    // _cookie.forEach(v => {
    //   let _d = v.split('=')
    //   _cookieArray.push({
    //     key: _d[0],
    //     value: _d[1]
    //   })
    // })
    this.$http.post(this._httpUrl + 'schoolConf/depart/manage/departOrganize', {}, {'headers': {'yxt-xtoken': localStorage.xtoken}}).then(function (response) {
      if (response.body.code === '000') {
        this.data = response.data.data
        if (this.data != null) {
          let lalala = []
          this.sList = []
          for (var h = 0; h < response.data.data.length; h++) {
            this.data[h].label = this.data[h].departName
            this.data[h].children = []
            this.data[h].children = this.data[h].subList
            lalala.push(response.data.data[h].id)
            // for (var z = 0; z < this.data[h].children.length; z++) {
            //   this.data[h].children[z].label = this.data[h].children[z].position
            //   lalala.push(response.data.data[h].children[z].id)
            // }
          }
          for (var e = 0; e < lalala.length - 1; e++) {
            this.sList.push(lalala[e])
          }
          // console.log(this.sList)
        } else {
          this.data = []
          this.sList = []
        }
        this.data2 = response.data.data
        for (var i = 0; i < response.data.data.length; i++) {
          this.data2[i].label = this.data2[i].departName
          this.data2[i].children = []
          this.data2[i].children = this.data2[i].subList
          this.$set(this.data2[i], 'tree', false)
          this.$set(this.data2[i], 'rightArrow', true)
          this.$set(this.data2[i], 'bottomArrow', false)
          if (this.data2[i].children !== null) {
            for (var a = 0; a < this.data2[i].children.length; a++) {
              this.data2[i].children[a].label = this.data2[i].children[a].position
            }
          }
        }
      } else if (response.body.code === '887') {
        this.$router.push('/')
      } else if (response.body.code === '889') {
        this.$router.push('/')
      }
    })
  },
  methods: {
    getCheckedNodes () {},
    getData () {
      this.schoolName = '组织架构'
      // let _cookie = document.cookie.split(';')
      // let _cookieArray = []
      // _cookie.forEach(v => {
      //   let _d = v.split('=')
      //   _cookieArray.push({
      //     key: _d[0],
      //     value: _d[1]
      //   })
      // })
      this.$http.post(this._httpUrl + 'schoolConf/depart/manage/departOrganize', {}, {'headers': {'yxt-xtoken': localStorage.xtoken}}).then(function (response) {
        if (response.body.code === '000') {
          this.data = response.data.data
          if (this.data != null) {
            let lalala = []
            this.sList = []
            for (var h = 0; h < response.data.data.length; h++) {
              this.data[h].label = this.data[h].departName
              this.data[h].children = []
              this.data[h].children = this.data[h].subList
              lalala.push(response.data.data[h].id)
              // for (var z = 0; z < this.data[h].children.length; z++) {
              //   this.data[h].children[z].label = this.data[h].children[z].position
              //   lalala.push(response.data.data[h].children[z].id)
              // }
            }
            for (var e = 0; e < lalala.length - 1; e++) {
              this.sList.push(lalala[e])
            }
            // console.log(this.sList)
          } else {
            this.data = []
            this.sList = []
          }
          this.data2 = response.data.data
          for (var i = 0; i < response.data.data.length; i++) {
            this.data2[i].label = this.data2[i].departName
            this.data2[i].children = []
            this.data2[i].children = this.data2[i].subList
            this.$set(this.data2[i], 'tree', false)
            this.$set(this.data2[i], 'rightArrow', true)
            this.$set(this.data2[i], 'bottomArrow', false)
            if (this.data2[i].children !== null) {
              for (var a = 0; a < this.data2[i].children.length; a++) {
                this.data2[i].children[a].label = this.data2[i].children[a].position
              }
            }
          }
        } else if (response.body.code === '887') {
          this.$router.push('/')
        } else if (response.body.code === '889') {
          this.$router.push('/')
        }
      })
    },
    checkChange (leafOnly) {
      this.schoolList = []
      let asdf = []
      for (var i = 0; i < this.$refs.tree2.getCheckedNodes(leafOnly).length; i++) {
        this.schoolList.push({id: null})
        this.schoolList[i].id = this.$refs.tree2.getCheckedNodes(leafOnly)[i].id
        if (asdf.indexOf(this.$refs.tree2.getCheckedNodes(leafOnly)[i].parentId) < 0) {
          asdf.push(this.$refs.tree2.getCheckedNodes(leafOnly)[i].parentId)
        }
      }
      for (var a = 0; a < asdf.length; a++) {
        this.schoolList.push({id: asdf[a]})
      }
    },
    newAddShow () {
      this.upShow = !this.upShow
      this.anShow = !this.anShow
      this.departmentName = null
    },
    addPeopleData () {
      // let _cookie = document.cookie.split(';')
      // let _cookieArray = []
      // _cookie.forEach(v => {
      //   let _d = v.split('=')
      //   _cookieArray.push({
      //     key: _d[0],
      //     value: _d[1]
      //   })
      // })
      this.$http.post(this._httpUrl + 'schoolConf/depart/manage/addPosition', {departId: this.addPeopleForm.departId, position: this.addPeopleForm.position, positionCode: this.addPeopleForm.positionCode}, {'headers': {'yxt-xtoken': localStorage.xtoken}}).then(function (response) {
        if (response.body.code === '000') {
          this.getData()
          this.addPeople = !this.addPeople
          this.anShow = !this.anShow
          this.addPeopleForm.position = null
          this.addPeopleForm.positionCode = null
          // this.departmentName = null
          // this.roleArray = []
        } else if (response.body.code === '887') {
          this.$router.push('/')
        } else if (response.body.code === '889') {
          this.$router.push('/')
        }
      })
    },
    newAddPeople (item) {
      this.addPeople = !this.addPeople
      this.anShow = !this.anShow
      console.log(item)
      this.addPeopleForm.departId = item.departId
    },
    closeAddPeople () {
      this.addPeople = !this.addPeople
      this.anShow = !this.anShow
      this.addPeopleForm.position = null
      this.addPeopleForm.positionCode = null
    },
    DEPxiugaishow (item) {
      this.DEPxiugaiShow = !this.DEPxiugaiShow
      this.anShow = !this.anShow
      this.id = item.id
      this.xiugaidepartmentName = item.label
    },
    closeDEPxiugaishow () {
      this.DEPxiugaiShow = !this.DEPxiugaiShow
      this.anShow = !this.anShow
    },
    mover (ev) {
      ev.path[2].lastElementChild.style.opacity = 0
    },
    mout (ev) {
      ev.path[2].lastElementChild.style.opacity = 1
      // console.log(ev)
    },
    append (store, data) {
      // store.append({ code: code++, label: 'testtest', children: [] }, data)
      this.upShow = true
    },
    change (store, data) {
      // store.append({ code: code++, label: 'testtest', children: [] }, data)
      this.upShow = true
    },
    remove (store, data) {
      store.remove(data)
    },
    xiugaishow (item, items) {
      this.positionForm.id = items.id
      this.positionForm.departId = items.departId
      this.positionForm.position = items.label
      this.positionForm.positionCode = items.positionCode
      this.xiugaidepartmentName = item.label
      this.xiugaiShow = !this.xiugaiShow
      this.anShow = !this.anShow
      // this.roleArray = []
      // this.id = item.id
      // console.log(item)
      // if (item.children !== null) {
      //   for (var i = 0; i < item.children.length; i++) {
      //     this.roleArray.push({label: item.children[i].label, name: '角色' + (i + 1)})
      //   }
      //   console.log(this.roleArray)
      // }
    },
    closexiugaishow () {
      this.xiugaiShow = !this.xiugaiShow
      this.anShow = !this.anShow
    },
    addRole () {
      let length = this.roleArray.length + 1
      this.roleArray.push({name: '角色' + length})
    },
    reduceRole () {
      this.roleArray.pop()
    },
    addDepartment () {
      // let _cookie = document.cookie.split(';')
      // let _cookieArray = []
      // _cookie.forEach(v => {
      //   let _d = v.split('=')
      //   _cookieArray.push({
      //     key: _d[0],
      //     value: _d[1]
      //   })
      // })
      this.$http.post(this._httpUrl + 'schoolConf/depart/manage/addDepart', {departName: this.departmentName}, {'headers': {'yxt-xtoken': localStorage.xtoken}}).then(function (response) {
        if (response.body.code === '000') {
          this.getData()
          this.upShow = !this.upShow
          this.anShow = !this.anShow
          this.departmentName = null
          this.roleArray = []
        } else if (response.body.code === '887') {
          this.$router.push('/')
        } else if (response.body.code === '889') {
          this.$router.push('/')
        }
      })
    },
    deleteData (item) {
      // let _cookie = document.cookie.split(';')
      // let _cookieArray = []
      // _cookie.forEach(v => {
      //   let _d = v.split('=')
      //   _cookieArray.push({
      //     key: _d[0],
      //     value: _d[1]
      //   })
      // })
      this.$http.post(this._httpUrl + 'schoolConf/depart/manage/delDepart', {departId: this.departId}, {'headers': {'yxt-xtoken': localStorage.xtoken}}).then(function (response) {
        if (response.body.code === '000') {
          this.getData()
          this.DEPtip = !this.DEPtip
          this.anShow = !this.anShow
        } else if (response.body.code === '887') {
          this.$router.push('/')
        } else if (response.body.code === '889') {
          this.$router.push('/')
        }
      })
    },
    deleteZWData (items) {
      // let _cookie = document.cookie.split(';')
      // let _cookieArray = []
      // _cookie.forEach(v => {
      //   let _d = v.split('=')
      //   _cookieArray.push({
      //     key: _d[0],
      //     value: _d[1]
      //   })
      // })
      this.$http.post(this._httpUrl + 'schoolConf/depart/manage/delPosition', {id: this.positionId}, {'headers': {'yxt-xtoken': localStorage.xtoken}}).then(function (response) {
        if (response.body.code === '000') {
          this.getData()
          this.PEOtip = !this.PEOtip
          this.anShow = !this.anShow
        } else if (response.body.code === '887') {
          this.$router.push('/')
        } else if (response.body.code === '889') {
          this.$router.push('/')
        }
      })
    },
    changeDepartment () {
      // let _cookie = document.cookie.split(';')
      // let _cookieArray = []
      // _cookie.forEach(v => {
      //   let _d = v.split('=')
      //   _cookieArray.push({
      //     key: _d[0],
      //     value: _d[1]
      //   })
      // })
      this.$http.post(this._httpUrl + 'schoolConf/depart/manage/updateDepart', {id: this.id, departName: this.xiugaidepartmentName}, {'headers': {'yxt-xtoken': localStorage.xtoken}}).then(function (response) {
        if (response.body.code === '000') {
          this.getData()
          this.DEPxiugaiShow = !this.DEPxiugaiShow
          this.anShow = !this.anShow
          this.xiugaidepartmentName = null
        } else if (response.body.code === '887') {
          this.$router.push('/')
        } else if (response.body.code === '889') {
          this.$router.push('/')
        }
      })
    },
    changePosition () {
      // let _cookie = document.cookie.split(';')
      // let _cookieArray = []
      // _cookie.forEach(v => {
      //   let _d = v.split('=')
      //   _cookieArray.push({
      //     key: _d[0],
      //     value: _d[1]
      //   })
      // })
      this.$http.post(this._httpUrl + 'schoolConf/depart/manage/updatePosition', {id: this.positionForm.id, departId: this.positionForm.departId, position: this.positionForm.position, positionCode: this.positionForm.positionCode}, {'headers': {'yxt-xtoken': localStorage.xtoken}}).then(function (response) {
        if (response.body.code === '000') {
          this.getData()
          this.xiugaiShow = !this.xiugaiShow
          this.anShow = !this.anShow
          // this.xiugaidepartmentName = null
        } else if (response.body.code === '887') {
          this.$router.push('/')
        } else if (response.body.code === '889') {
          this.$router.push('/')
        }
      })
    },
    buttonShow () {
      this.buttonshow = true
      this.bianji = false
      this.baocun = true
    },
    clearbutton () {
      this.buttonshow = false
      this.bianji = true
      this.baocun = false
    },
    changeTree (item) {
      item.tree = !item.tree
      item.rightArrow = !item.rightArrow
      item.bottomArrow = !item.bottomArrow
    },
    filterNode (value, data) {
      if (!value) return true
      return data.label.indexOf(value) !== -1
    },
    DEPtipShow (item) {
      this.DEPtip = !this.DEPtip
      this.anShow = !this.anShow
      this.departId = item.departId
    },
    closeDtip () {
      this.DEPtip = !this.DEPtip
      this.anShow = !this.anShow
    },
    PEOtipShow (items) {
      this.PEOtip = !this.PEOtip
      this.anShow = !this.anShow
      this.positionId = items.id
    },
    closePtip () {
      this.PEOtip = !this.PEOtip
      this.anShow = !this.anShow
    }
  }
}
</script>

<style scoped>
  @import '/static/css/demo-documentation.css';
  .kong1{
    padding: 1px;
  }
  .myfile{
    width:54% !important;
    min-width: 595.67px !important;
    height: 440px;
  }
  .myfile .el-tree{
    position: relative; left: 35%;
    width: 210.1%;
    border: none;
  }
  .myfile .t_title{
    position: relative; left: 18%;
  }
  .myfile .t_title img{
    float: left;
    width: 20px; height: 20px;
    background: #ccc;
    margin-right: 1%;
  }
  section .line{
    position: absolute; left: 55%; top: 60px;
    width: 1px; height: 56%;
    border-left: 1px dashed #666;
  }
  section .dright{
    position: absolute; right: 2%; top: 51px;
    width: 40%; height: 460px;
    background: #fff;
    border-radius: 4px;
  }
  section .dright .t_title{
    margin-top: 30px;
    margin-left: 6%;
  }
  section .dright .t_title .right{
    position: absolute;
    right: 4%;
    top: 15px;
  }
  section .dright .t_title img{
    float: left;
    width: 20px; height: 20px;
    background: #ccc;
    margin-right: 1%;
  }
  section .dright .dspan{
    position: relative; top: 12px;
    margin-left: 6%;
  }
  section .dright select{
    position: relative; top: 12px;
    width: 54%;
    border: none;
    border-bottom: 1px solid #ccc;
  }
  section .dright .t-btn{
    position: relative; left: 34%; top: 14px;
  }
  section .dright .tree{
    position: relative; left: 6%; top: 10px;
    width: 90%;
  }
  section .tree{
    position: relative; left: 2%; top: 14px;
  }
  div[data-v-22bf8d34] ul
  {
    position: relative;
    left: 12%;
  }
  div[data-v-22bf8d34]
  {
    padding-bottom: 10px;
  }
  .el-upload--picture-card
  {
    margin-left: 9%; 
    margin-top: 40px;
    width: 80px; height: 80px;
  }
  .el-upload--picture-card i
  {
    position: relative; top: -28px;
  }
  .tree{
    position: relative; left: 60%;
    width: 40%;
  }
  .span{
    opacity: 0;
  }

  .up{
    width: 35%;
    position: fixed;
    top: 10%;
    left: 50%;
    margin-left: -17%;
    background: #FFF;
    padding: 20px 20px 0 20px;
    border-radius: 5px;
    z-index: 99999;
  }
  .up .img{
    position: absolute;
    left: 24px;
    top: -20px;
  }
  .up .title{
    margin-left: 90px;
  }
  .up header{
    height: 24px;
    border-bottom: 2px solid #D7D7D7;
    padding: 30px 0 10px 0;
    margin-left: 1%;
    margin-right: 10px;
    margin-bottom: 10px;
  }
  .up .header-title{
    height: 24px;
    display: inline-block;
    color: #FB7862;
    border-bottom: 2px solid #FB7862;
    padding: 0 10px 10px 10px;
    margin-left: 0;
  }
  .form-longText{
    width: 50%;
    border: 0;
    border-bottom: 1px solid #D7D7D7;
  }
  .up .form{
    margin-left: 5%;
  }
  .up .form .form-longText:disabled{
    background: #fff;
  }
  .form-text{
    width: 50%;
    border: 0;
    border-bottom: 1px solid #D7D7D7;
  }
  .up ul{
    margin-top: 10px;
    margin-left: 75px;
  }
  .up ul li{
    float: left;
    padding: 15px 0;
  }
  .up .clear{
    clear: both;
  }
  .up .bottom{
    border-top: 1px solid #D7D7D7;
    margin-top: 20px;
    background: #F8F8F8;
    padding: 8px 0;
    margin-left: -20px;
    margin-right: -20px;
    border-radius: 0 0 5px 5px;
  }
  .up .bottom .right{
    text-align: right;
    padding: 0 10px 0 0;
  }
</style>

<style lang="less" scoped>
  .fatherUl{
    .childrenUl{
      .childrenLi{
        .right{
          i {
            margin-left: 8px;
          }
        }
      }
    }
    .fatherLi{
      .right{
        i {
          margin-left: 8px;
        }
      }
      min-height: 25px;
      padding: 5px 0;
      .right{
        float: right;
      }
    }
    .childrenLi{
      padding: 5px 0;
      min-height: 25px;
      margin-left: 10%;
      .right{
        float: right;
      }
    }
  }
  .dright{
    .tree{
      height: 350px;
      overflow: auto;
    }
  }
  .smallUp{
    width: 30%;
    position: absolute;
    top: 10%;
    left: 50%;
    margin-left: -15%;
    background: #FFF;
    padding: 20px;
    border-radius: 5px;
    z-index: 99999;
    .word{
      text-align: center;
    }
    .button{
      margin-top: 20px;
      text-align: center;
    }
  }
</style>
